package com.hbnu;

import com.hbnu.service.PetService;
import com.hbnu.service.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Application {
    public static void main(String[] args) {

        ApplicationContext ioc = new ClassPathXmlApplicationContext("beans.xml");

        //UserService userService = ioc.getBean(UserService.class);
        UserService userService = ioc.getBean("userService", UserService.class);

        //System.out.println(userService.getClass());
        //userService.addUser();

        //AccountDao accountDao = ioc.getBean(AccountDao.class);
        //System.out.println(accountDao.getAccount());

        PetService petService = ioc.getBean(PetService.class);
        System.out.println(petService.getAccountDao());
        System.out.println(petService.getItemDao());


    }
}
